package com.mvp.shq.washer.ui.orderDetail;

import com.mvp.shq.washer.entity.OrderInfo;
import com.mvp.shq.washer.entity.result.BaseResult;
import com.mvp.shq.washer.http.Api;
import com.mvp.shq.washer.http.ApiService;
import com.mvp.shq.washer.http.RxSchedulers;

import io.reactivex.Observable;

/**
 * Created by Administrator on 2017/8/28.
 */

public class OrderDetailModel implements OrderDetailConstract.Model {
    @Override
    public Observable<BaseResult<OrderInfo>> getOrderInfo(String token, String orderNo) {
        return Api.getInstance().service
                .orderInfo(token,orderNo)
                .compose(RxSchedulers.io_main());
    }

    @Override
    public Observable<BaseResult<String>> setErrorOrder(String token,String orderNo) {
        return Api.getInstance().service
                .setErrorOrder(token,orderNo)
                .compose(RxSchedulers.io_main());
    }

    @Override
    public Observable<BaseResult<String>> refund(String token, String userId, String orderNo, String content) {
        return Api.getInstance().service
                .refund(token,userId,orderNo,content)
                .compose(RxSchedulers.io_main());
    }
}
